<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-soil-edit" th:object="${soil}">
        <input id="sid" name="sid" type="hidden" th:field="*{sid}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label ">类型：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="type" id="type" th:field="*{type}"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">地域：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="area" id="area" th:field="*{area}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">探测深度：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="depth" id="depth" th:field="*{depth}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">酸碱度：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="ph" id="ph" th:field="*{ph}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">水分：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="water" id="water" th:field="*{water}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">盐分：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="sailnity" id="sailnity" th:field="*{sailnity}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">有机质：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="organic" id="organic" th:field="*{organic}">
            </div>
        </div>

    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "iot/soil";

    $("#form-soil-edit").validate({
        rules:{
            xxxx:{
                required:true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-soil-edit').serialize());
        }
    }
</script>
</body>
</html>
